package com.tao.graduation.Service.Impl;

import com.tao.graduation.Dao.AdminDao;
import com.tao.graduation.Pojo.*;
import com.tao.graduation.Service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminDao adminDao;


    @Override
    public List<Doctor> queryDoctor(Integer index,Integer LIMIT) {
        return adminDao.queryDoctor(index, LIMIT);
    }

    @Override
    public int queryDoctorCount() {
        return adminDao.queryDoctorCount();
    }

    @Override
    public int updateDoctor(Doctor doctor) {
        return adminDao.updateDoctor(doctor);
    }

    @Override
    public int updateDoctorHP(Doctor doctor) {
        return adminDao.updateDoctorHP(doctor);
    }

    @Override
    public int deleteDoctor(Integer id) {
        return adminDao.deleteDoctor(id);
    }

    @Override
    public int insertDoctorInfo(Doctor doctor) {
        return adminDao.insertDoctorInfo(doctor);
    }

    @Override
    public List<Doctor> searchDoctor(String name, String certId) {
        return adminDao.searchDoctor(name, certId);
    }

    @Override
    public List<Patient> queryPatient(Integer index,Integer LIMIT) {
        return adminDao.queryPatient(index, LIMIT);
    }

    @Override
    public int queryPatientCount() {
        return adminDao.queryPatientCount();
    }

    @Override
    public int updatePatient(Patient patient) {
        return adminDao.updatePatient(patient);
    }

    @Override
    public int deletePatient(Integer id) {
        return adminDao.deletePatient(id);
    }

    @Override
    public int insertPatient(Patient patient) {
        return adminDao.insertPatient(patient);
    }

    @Override
    public List<Patient> searchPatient(String name, String certId) {
        return adminDao.searchPatient(name, certId);
    }

    @Override
    public List<Drugs> queryDrugs(Integer index,Integer LIMIT) {
        return adminDao.queryDrugs(index,LIMIT);
    }

    @Override
    public int queryDrugsCount() {
        return adminDao.queryDrugsCount();
    }

    @Override
    public int insertDrugs(Drugs drugs) {
        return adminDao.insertDrugs(drugs);
    }

    @Override
    public int updateDrugs(Drugs drugs) {
        return adminDao.updateDrugs(drugs);
    }

    @Override
    public int deleteDrugs(Integer id) {
        return adminDao.deleteDrugs(id);
    }

    @Override
    public List<Drugs> searchDrugs(String name, Integer number) {
        return adminDao.searchDrugs(name, number);
    }

    @Override
    public List<Map<String, String>> queryOrder(Integer index, Integer LIMIT) {
        return adminDao.queryOrder(index, LIMIT);
    }

    @Override
    public int queryOrderCount() {
        return adminDao.queryOrderCount();
    }

    @Override
    public int deleteOrder(Integer id) {
        return adminDao.deleteOrder(id);
    }

    @Override
    public List<Map<String, String>> searchOrder(String name, String doctorName) {
        return adminDao.searchOrder(name, doctorName);
    }

    @Override
    public List<News> queryNews(Integer index, Integer LIMIT) {
        return adminDao.queryNews(index, LIMIT);
    }

    @Override
    public int queryNewsCount() {
        return adminDao.queryNewsCount();
    }

    @Override
    public int insertNews(News news) {
        return adminDao.insertNews(news);
    }

    @Override
    public int updateNews(News news) {
        return adminDao.updateNews(news);
    }

    @Override
    public int deleteNews(Integer id) {
        return adminDao.deleteNews(id);
    }

    @Override
    public List<News> searchNews(String title, String createTime) {
        return adminDao.searchNews(title, createTime);
    }

    @Override
    public List<Map<String,Integer>> CountPeople(Integer year) {
        return adminDao.CountPeople(year);
    }

    @Override
    public List<Map<String, Object>> CountCost() {
        return adminDao.CountCost();
    }




    @Override
    public int selectId(String name) {
        return adminDao.selectId(name);
    }

    @Override
    public List<Map<String,String>> queryHospital(Integer index,Integer LIMIT) {
        return adminDao.queryHospital(index, LIMIT);
    }

    @Override
    public int queryHospitalCount() {
        return adminDao.queryHospitalCount();
    }

    @Override
    public int updateHospital(Integer id) {
        return adminDao.updateHospital(id);
    }

    @Override
    public List<Map<String, String>> queryResident(Integer index, Integer LIMIT) {
        return adminDao.queryResident(index, LIMIT);
    }

    @Override
    public int queryResidentCount() {
        return adminDao.queryResidentCount();
    }

    @Override
    public List<Map<String,String>> queryScheduling(String option) {
        return adminDao.queryScheduling(option);
    }

    @Override
    public List<Integer> querySchedulingCount(String option) {
        return adminDao.querySchedulingCount(option);
    }

    @Override
    public int insertScheduling(Scheduling scheduling) {
        return adminDao.insertScheduling(scheduling);
    }

    @Override
    public int deleteScheduling(Integer id) {
        return adminDao.deleteScheduling(id);
    }

    @Override
    public List<String> querySchedulingName(String option) {
        return adminDao.querySchedulingName(option);
    }
}
